#!/usr/bin/env python3
#-*- coding:utf8 -*-
# Power by 2020-06-11 22:44:14

import paddle
import paddle.fluid as fluid
from paddle.fluid.dygraph.nn import Conv2D,Pool2D,Linear

class MNIST(fluid.dygraph.Layer):

    """Docstring for MNIST. """

    def __init__(self):
        """TODO: to be defined. """
        super(MNIST,self).__init__()
        self.fc1=Linear(input_dim=784,output_dim=10,act='sigmoid')
        self.fc2=Linear(input_dim=10,output_dim=10,act='sigmoid')
        self.fc3=Linear(input_dim=10,output_dim=1,act=None)
    def forward(self, inputs,label=None):
        """TODO: Docstring for forward.

        :inputs: TODO
        :label: TODO
        :returns: TODO

        """
        inputs=fluid.layers.reshape(inputs,[inputs.shape[0],784])
        outputs1=self.fc1(inputs)
        outputs2=self.fc2(outputs1)
        outputsfinal=self.fc3(outputs2)
        return outputsfinal

        
